package com.example.placean.controller;

import com.example.common.AjaxResult;

import com.example.placean.domain.dto.PriceDto;
import com.example.placean.service.PlaceAnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 下单Controller层
 * @author jiangshoutong
 */
@RestController
@RequestMapping("/placeAn")
public class PlaceAnController {

    @Autowired
    PlaceAnService placeAnService;

    @RequestMapping("/getCost")
    public AjaxResult  getCost(@RequestBody PriceDto priceDto) throws Exception {
        return AjaxResult.success("success",placeAnService.getPrice(priceDto));
    }
}
